const request = (url, method, data) => {
	return new Promise((resolve) => {
		uni.request({
		    url: 'http://www.pudge.wang:4000' + url, //仅为示例，并非真实接口地址。
			method: method || "GET",
		    data: data || {},
		    header: {
		        "content-type": "application/json"
		    },
		    success: (res) => {
		        resolve(res.data);
		    }
		});
	})
}

export default request;